package com.toocms.jinjuhang.ui.mine.integral

import com.toocms.jinjuhang.R
import com.toocms.jinjuhang.BR
import com.toocms.jinjuhang.databinding.FgtMyIntegralBinding
import com.toocms.jinjuhang.ui.base.BaseFgt

class MyIntegralFgt : BaseFgt<FgtMyIntegralBinding, MyIntegralModel>() {
    override fun onFragmentCreated() {
        topBar.apply {
            setTitle(R.string.str_my_integral)
            addRightTextButton(R.string.str_integral_rule, R.id.menu_rule)
                .setOnClickListener {

                }
        }
    }

    override fun getLayoutResId() = R.layout.fgt_my_integral

    override fun getVariableId() = BR.myIntegralModel

    override fun viewObserver() {
        viewModel.stopRefreshOrLoadSingleLiveEvent.observe(this){
            binding.refreshSrl.finishRefresh()
            binding.refreshSrl.finishLoadMore()
        }
    }
}